<template>
	<view class="descArea">
		<view class="">
			<uv-form-item prop="content">
				<uv-textarea :value="modelValue" placeholder="描述" border="none" placeholderClass="customInputPlaceholder"
					:maxlength="rules.content.max" :count="true" @change="change" :customStyle="{ padding: 0 }"></uv-textarea>
			</uv-form-item>
		</view>
	</view>
</template>

<script setup>
	import {
		ref,
		toRef,
		watch,
		inject,
	} from "vue";

	const rules = inject('rules')
	const props = defineProps({
		modelValue: {
			type: String,
			default: '0'
		}
	})
	const modelValue = toRef(props, 'modelValue')
	const emit = defineEmits(['update:modelValue'])

	const change = (val) => {
		emit('update:modelValue', val)
	}
</script>

<style lang="scss">
	.descArea {
		padding: 0 30rpx;
		border-radius: 10rpx;
		overflow: hidden;

		>view {
			padding: 20rpx;
			background: #fff;
		}
	}
</style>